package com.woniuxy01;

import java.io.File;

/**
 * @author 作者
 * @create 2025-07-31 17:19
 */
public class Test03 {
    public static void main(String[] args) {
        move(3,"A","B","C");
    }

    public static void move(int n,String start,String help,String end){
        if(n==1){
            System.out.println(start+"--->"+end);
        }else{
            move(n-1,start,end,help);
            System.out.println(start+"--->"+end);
            move(n-1,help,start,end);
        }
    }

    public static void showDirectory(String path) {
        File file = new File(path);
        File[] files = file.listFiles();
        for( File f : files){
            if (f.isFile()) {
                System.out.println(f.getAbsolutePath());
            }else{
                //不是文件，就是文件夹
                showDirectory(f.getAbsolutePath());
            }
        }
    }

    public static int fnnot(int n){
        if(n==1||n==2){
            return 1;
        }else{
            int f1=1,f2=1,t=0;
            for(int i=3;i<=n;i++){
                t=f1+f2;
                f1=f2;
                f2=t;
            }
            return t;
        }
    }
    public static int fn(int n){
        if(n==1||n==2){
            return 1;
        }else{
            return fn(n-1)+fn(n-2);
        }
    }

    static int sum(int num){
        if(num==1){
            return 1;
        }else{
            return num+sum(num-1);
        }
    }
    static int sumNot(int num){
        int sum = 0 ,i=1;
        while(i<=num){
            sum += i;
            i++;
        }
        return sum;
    }

    private static void test01() {
        System.out.println("test01");
//        test01();
    }
}
